const express = require('express')
const router = express.Router()
const { PageController } = require('../controller/page')
const authMiddleware = require('../middleware/auth')
router.post('/v1/page/publish', authMiddleware, PageController.pagePublish)
router.post('/v1/page/add', authMiddleware, PageController.pageAdd)
router.put('/v1/page/edit', authMiddleware, PageController.pageUpd)
router.delete('/v1/page/del', authMiddleware, PageController.pageDel)
router.get('/v1/page/list', authMiddleware, PageController.pageList)
router.get(
  '/v1/page/listByProjectId',
  authMiddleware,
  PageController.listByProjectId
)
router.post(
  '/v1/page/read',
  authMiddleware,
  PageController.readPageInfo
)
router.post(
  '/v1/page/write',
  authMiddleware,
  PageController.savePageInfo
)
router.get(
  '/v1/page/info',
  authMiddleware,
  PageController.pageInfoById
)
router.get(
  '/v1/page/copy',
  authMiddleware,
  PageController.pageCopyById
)
module.exports = router
